home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Mark Pilgrim / Lose Your Marbles! 1.0 / source / ls code ƒ / program globals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-30  |  2.3 KB  |  88 lines  |  [TEXT/KAHL]

  1. /**********************************************************************\
  2.  
  3. File:        program globals.h
  4.  
  5. Purpose:    This is the header file for all the program-specific
  6.             global variables, #defines, enums, and structs.
  7.  
  8. This program is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2 of the License, or
  11. (at your option) any later version.
  12.  
  13. This program is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with this program in a file named "GNU General Public License".
  20. If not, write to the Free Software Foundation, 675 Mass Ave,
  21. Cambridge, MA 02139, USA.
  22.  
  23. \**********************************************************************/
  24.  
  25. #ifndef _PROGRAM_GLOBALS_H_
  26. #define _PROGRAM_GLOBALS_H_
  27.  
  28. #define CREATOR            'Lym!'
  29. #define APPLICATION_NAME "\pLose Your Marbles!"
  30. #define    SAVE_TYPE        'Sqrs'
  31. #define    SAVE_VERSION    1
  32.  
  33. enum                    /* window indices in gTheWindowData[] lists */
  34. {
  35.     kAbout=0,            /* about box */
  36.     kAboutMSG,            /* "About MSG" splash screen */
  37.     kHelp,                /* help window */
  38.     kMainWindow            /* main graphics window */
  39. };
  40.  
  41. #define    NUM_WINDOWS        4        /* total number of windows (see above enum) */
  42.  
  43. enum ErrorTypes
  44. {
  45.     allsWell=0,
  46.     
  47.     /* shell errors */
  48.     kNoMemory,
  49.     kNoMemoryAndQuitting,
  50.     kProgramIntegrityNotVerified,
  51.     kProgramIntegritySet,
  52.     kSystemTooOld,
  53.     userCancelErr,
  54.     
  55.     /* deBinHex errors */
  56.     kCantOpenInputFile,
  57.     kCantCreateTempFile,
  58.     kBinHexErr,
  59.     kDiskReadErr,
  60.     kDiskWriteErr,
  61.     kNeedMoreBinHexErr,
  62.  
  63.     /* program-specific errors */
  64.     kCantCreateGame,
  65.     kCantOpenGameToSave,
  66.     kDiskFull,
  67.     kCantWriteGame,
  68.     kCantOpenGameToLoad,
  69.     kCantLoadGame,
  70.     kBadChecksum,
  71.     kSaveVersionNotSupported
  72. };
  73.  
  74. #define MAX_ROWS        8
  75. #define    MAX_COLS        MAX_ROWS
  76.  
  77. extern    CIconHandle        gTheCIcon[10];
  78. extern    Handle            gTheIcon[10];
  79. extern    short            Board[MAX_ROWS][MAX_COLS];
  80. extern    short            gNumRows, gNumColumns;
  81. extern    short            gCurrentRow, gCurrentColumn;
  82. extern    Point            gMoves[MAX_ROWS*MAX_COLS];
  83. extern    short            gNumMoves;
  84. extern    FSSpec            gameFile;
  85. extern    Boolean            deleteTheThing;
  86.  
  87. #endif
  88.